/**
 * 
 */
package com.aibili.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 用户充值记录表
 * 
 * @author qiuch
 */
@Entity
@Table(name = "t_charge_record")
public class ChargeRecord implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6734740117231616299L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", length = 11, nullable = false)
	private long id;

	@Column(name = "user_id")
	private long user_id;

	@Column(name = "charge_num")
	private int charge_num;// 充值U币 或者消费U币

	@Column(name = "money")
	private double money;//提现金额 或者接受视频收益 rmb
	
	@Column(name = "gift_ids")
	private int gift_ids;// 0充值u币 1提现rmb 2发起1分钟视频扣U币 3接受1分钟视频加rmb
	                     //4发起5分视频扣U币 5接受5分钟视频加rmb

	@Column(name = "proportion")
	private int proportion;//0未申请提现 1 申请提现 2提现成功 

	@Column(name = "type")
	private int type;// 充值方式 1支付宝 2银联
	
	@Column(name = "alipayordernum",columnDefinition = "DEFAULT 0")
	private String alipayordernum;
	
	@Column(name = "flg")
	private int flg;//支付状态 0支付失败 1支付成功
	
	@Column(name = "charge_time", columnDefinition = "TIMESTAMP default CURRENT_TIMESTAMP")
	private Date charge_time;

	@Transient
	private UserInfo user;

	public UserInfo getUser() {
		return user;
	}

	public void setUser(UserInfo user) {
		this.user = user;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getUser_id() {
		return user_id;
	}

	public void setUser_id(long user_id) {
		this.user_id = user_id;
	}

	public int getCharge_num() {
		return charge_num;
	}

	public void setCharge_num(int charge_num) {
		this.charge_num = charge_num;
	}

	
	public int getGift_ids() {
		return gift_ids;
	}

	public void setGift_ids(int gift_ids) {
		this.gift_ids = gift_ids;
	}

	public int getProportion() {
		return proportion;
	}

	public void setProportion(int proportion) {
		this.proportion = proportion;
	}

	public Date getCharge_time() {
		return charge_time;
	}

	public void setCharge_time(Date charge_time) {
		this.charge_time = charge_time;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getAlipayordernum() {
		return alipayordernum;
	}

	public void setAlipayordernum(String alipayordernum) {
		this.alipayordernum = alipayordernum;
	}

	public int getFlg() {
		return flg;
	}

	public void setFlg(int flg) {
		this.flg = flg;
	}

	public double getMoney() {
		return money;
	}

	public void setMoney(double money) {
		this.money = money;
	}


}
